#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QPainter>
#include <QPen>
#include <QFile>
#include <QMessageBox>
#include <qDebug>
#include <math.h>
#include <QFileDialog>
#include <QDir>
#include <QFileInfoList>
#include <QStringListModel>
#include <QScreen>
#include <QCursor>
#include <QPoint>

#define WIDTH   50
#define HEIGHT  50

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    ui->label->setScaledContents(true);

    pPixmap = new QPixmap(WIDTH,HEIGHT);
    pPixmap->fill();

    QPainter painter(pPixmap);
    QPen pen;
    QPoint point(WIDTH / 2, HEIGHT / 2);
    QColor color(255,0,0);

    pen.setColor(color);
    pen.setWidth(10);
    pen.setCapStyle(Qt::RoundCap);


    painter.setPen(pen);
    painter.drawPoint(point);

    ui->label->setPixmap(*pPixmap);

}

MainWindow::~MainWindow()
{
    delete ui;
}
